<?php
class MatchModel extends Model{
	public function matchlist(){
		$sql = "select t1.team as tn1,m.teamone,m.score,t2.team as tn2,m.teamtwo from `match` as m
		LEFT JOIN team as t1 ON m.teamone=t1.id
		LEFT JOIN team as t2 ON m.teamtwo=t2.id";
		return $this->_m->query($sql);
	}
}
?>
